package com.lt.schoolchat.config;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;

/**
 * @description:
 * @author: ~Teng~
 * @date: 2023/6/11 16:30
 */
@Component
public class LoginInterceptor implements HandlerInterceptor {
//    @Override
//    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
//        User user = (User) request.getSession().getAttribute(UserConstant.USER_LOGIN_STATE);
//        if (user == null) {
//            throw new BusinessException(ErrorCode.NOT_LOGIN_ERROR, "请先登录！");
//        }
//        return true;
//    }
}
